﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using NumericalData.Interpolation.Data;
using NumericalData.Interpolation.Data.Methods;
using WPFSolution.UserControls;

namespace WPFSolution
{
    /// <summary>
    /// Interaction logic for DifferentialEquationsWindow.xaml
    /// </summary>
    public partial class DifferentialEquationsWindow : Window
    {
        public DifferentialEquationsWindow()
        {
            InitializeComponent();
            //Proj1Page page = new Proj1Page();
            //frame.Navigate(page);
            //InitializeComponent();
            //funcEditor.FunctionDataCreated += CreateGraphTabsByExpression;
        }

        public void CreateGraphTabsByExpression(ExpressionContainer container)
        {
            //busyIndic.IsBusy = true;
            //var newTab =
            //    new CloseableTabItem()
            //        {
            //            Content = new FunctionsDrawer(container,new StirlingMethod()),
            //            Header = String.Format("{0}\n{1} : {2}\npts:{3},ordr:{4}",
            //            container.Expression,
            //            container.IntervalStart,
            //            container.IntervalStop,
            //            container.Grid.Count,
            //            container.MethodOrder)
            //        };
            //newTab.CloseTab += CloseableTabClose;
            //mainTabControl.Items.Add(newTab);
            //busyIndic.IsBusy = false;
        }

        public void CloseableTabClose(object sender, RoutedEventArgs e)
        {
            //MessageBox.Show("Closing");
            var tab = (CloseableTabItem)sender;
            //mainTabControl.Items.Remove(tab);
        }

        private void NavigationWindow_Loaded(object sender, RoutedEventArgs e)
        {
            
        }

    }
}
